from models.post import BoardModel
from exts import db

def init_board():
    board_list=['Python','Java','Flask','Django','前端','Qt']
    for index,name in enumerate(board_list):
        board=BoardModel(name=name,priority=len(board_list)-index)
        db.session.add(board)
    db.session.commit()
    print("版块初始化成功!")